#ifndef __LEOS_IPC_H__
#define __LEOS_IPC_H__

#include "leos_list.h"
#include "leos_def.h"
#include "leos_hw.h"

#define LE_SEM_VALUE_MAX    0xFFFFFFFF

#define LE_WAIT_FOREVER     -1

struct le_sem {
    le_list_t       suspend_thread;
    le_uint32_t     value;
};

typedef struct le_sem *le_sem_t;

void le_sem_init(le_sem_t sem, le_int8_t value);
void le_sem_take(le_sem_t sem, le_int32_t tick);
void le_sem_release(le_sem_t sem);

#endif
